/*
 * AnimatorDB.h
 *
 *  Created on: 29.03.2012
 *      Author: Caffeine
 */
#ifdef __GAME__
#ifndef ANIMATORDB_H_
#define ANIMATORDB_H_

#include <irrlicht.h>
#include "../NodeParams.h"
namespace irr{
namespace core{
typedef irr::scene::ISceneNodeAnimator*(*EVENT_animatorCreate)(irr::NodeParams*params);

class AnimatorDB:virtual public irr::IReferenceCounted{
private:
	irr::core::map<irr::core::stringc,EVENT_animatorCreate> animators;
public:
	void regAnimator(irr::core::stringc name,EVENT_animatorCreate creator);
	irr::scene::ISceneNodeAnimator*getAnimator(irr::core::stringc name,irr::NodeParams*params);
	void setAnimator(irr::core::stringc name,irr::scene::ISceneNode*parent,NodeParams*params);
	bool isAnimationExist(irr::core::stringc name);
};

}//namespace core
}//namespace irr

#endif /* ANIMATORDB_H_ */

#endif
